/**
 * lab order
 */
package edu.gatech.oad.doctorsorder;

import edu.gatech.oad.records.LabResults;

/**
 * A lab order.
 * 
 * @author chen
 * @version 1.0
 */
public class LabOrder extends DoctorsOrder {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	/**
	 * order name
	 */
	private String name;

	/**
	 * lab location
	 */
	private String location;

	/**
	 * lab cost
	 */
	private double cost;

	/**
	 * lab results
	 */
	private LabResults testLab;

	/**
	 * Constructs a new lab order with specified name, location, note and cost.
	 * 
	 * @param notes
	 *            notes for the lab order
	 * @param name
	 *            lab's name
	 * @param location
	 *            lab's location
	 * @param cost
	 *            lab's cost
	 */
	public LabOrder(String notes, String name, String location, double cost) {
		super(notes);
		this.name = name;
		this.location = location;
		this.cost = cost;
		this.testLab = new LabResults("", this);
	}

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param name
	 *            the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @return the location
	 */
	public String getLocation() {
		return location;
	}

	/**
	 * @param location
	 *            the location to set
	 */
	public void setLocation(String location) {
		this.location = location;
	}

	/**
	 * @return the cost
	 */
	public double getCost() {
		return cost;
	}

	/**
	 * @param cost
	 *            the cost to set
	 */
	public void setCost(double cost) {
		this.cost = cost;
	}

	/**
	 * @return the current LabResults
	 */
	public LabResults getLabResult() {
		return testLab;
	}

	/**
	 * @param testLab
	 *            the new LabResults
	 */
	public void setLabResults(LabResults testLab) {
		this.testLab = testLab;
	}

	/**
	 * converts to string
	 * 
	 * @return the specified string
	 */
	@Override
	public String toString() {
		return "name: " + name + "; location: " + location + "; cost:" + cost
				+ "; note:" + this.getNotes();
	}

}
